package com.b.repository;

import com.b.domain.Favorite;
import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import org.springframework.data.domain.Pageable;
import org.springframework.data.elasticsearch.repository.ElasticsearchRepository;

import java.util.List;

public interface FavoriteRepository extends ElasticsearchRepository<Favorite,Integer> {
    List<Favorite> findByUserId(Integer userId);

    Page<Favorite> findPageByUserId(Integer userId ,Pageable pageable);
}
